home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / watch.h.z / watch.h
C/C++ Source or Header  |  1992-04-03  |  2KB  |  70 lines

  1. /**************************************************************************
  2.  *                                      *
  3.  *          Copyright (C) 1990, Silicon Graphics, Inc.          *
  4.  *                                      *
  5.  *  These coded instructions, statements, and computer programs  contain  *
  6.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  7.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  8.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  9.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  10.  *                                      *
  11.  **************************************************************************/
  12.  
  13. #ifndef __SYS_WATCH_H__
  14. #define __SYS_WATCH_H__
  15. #ident "$Revision: 1.3 $"
  16.  
  17.  
  18. /*
  19.  * a watchpoint struct - per watchpoint
  20.  */
  21. typedef struct watch_s {
  22.     caddr_t        w_vaddr;    /* start addr of watch point */
  23.     ulong        w_length;    /* length in bytes */
  24.     ulong        w_mode;        /* Read/Write/Execute */
  25.     struct watch_s *w_next;        /* link */
  26. } watch_t;
  27. #define W_READ    0x1
  28. #define W_WRITE 0x2
  29. #define W_EXEC    0x4
  30.  
  31. /* struct per process that has watchpoints */
  32. typedef struct pwatch_s {
  33.     watch_t        *pw_list;
  34.     uint        pw_flag;
  35.     caddr_t        pw_skipaddr;
  36.     caddr_t        pw_skipaddr2;
  37.     caddr_t        pw_skippc;    /* pc at skipaddr */
  38.     watch_t        pw_firstsys;    /* first watchpoint hit in system */
  39.     ulong        pw_curmode;    /* info to /proc */
  40.     caddr_t        pw_curaddr;    /* info to /proc */
  41.     ulong        pw_cursize;    /* info to /proc */
  42. } pwatch_t;
  43.  
  44. /* values for flag */
  45. #define WSTEP    0x00000001    /* stepping over a watchpoint */
  46. #define WINSYS    0x00000002    /* got watchpoint inside system space */
  47. #define WSETSTEP 0x00000004    /* watchpoint code set the single step */
  48. #define WINTSYS    0x00000008    /* interested system watchpoint */
  49. #define WIGN    0x00000010    /* skip this one no matter what */
  50.  
  51.  
  52. #ifdef _KERNEL
  53. extern int    maxwatchpoints;    /* max watchpoints per process */
  54.  
  55. void deleteallwatch(proc_t *p);
  56. int getwatch(proc_t *, caddr_t (*)(caddr_t, ulong, ulong, caddr_t), caddr_t);
  57. int deletewatch(proc_t *p, caddr_t vaddr);
  58. int clrwatch(proc_t *p, watch_t *w);
  59. int chkwatch(proc_t *p, caddr_t vaddr, uint *ep, ulong rw);
  60. int skipwatch(proc_t *p, caddr_t vaddr, uint *ep, ulong rw, pde_t *);
  61. void checkwatchstep(proc_t *p, uint *ep);
  62. int stepoverwatch(proc_t *p);
  63. int addwatch(proc_t *p, caddr_t vaddr, ulong size, ulong mode);
  64. int setwatch(proc_t *p, watch_t *w);
  65. int clrsyswatch(proc_t *p);
  66. void cancelskipwatch(proc_t *p);
  67. #endif /* _KERNEL */
  68.  
  69. #endif /* __SYS_WATCH_H__ */
  70.